//
// CWaterEnvMapRenderFromUScene.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CVector;

public class CWaterEnvMapRenderFromUScene extends CWaterEnvMapRenderHelper {
  private long swigCPtr;

  public CWaterEnvMapRenderFromUScene(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CWaterEnvMapRenderFromUScene_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CWaterEnvMapRenderFromUScene obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CWaterEnvMapRenderFromUScene(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public CWaterEnvMapRenderFromUScene() {
    this(nel3dJNI.new_CWaterEnvMapRenderFromUScene(), true);
  }

  public void setScene(UScene scene, UCamera cam) {
    nel3dJNI.CWaterEnvMapRenderFromUScene_setScene(swigCPtr, this, UScene.getCPtr(scene), scene, UCamera.getCPtr(cam), cam);
  }

  public void setCamPos(CVector pos) {
    nel3dJNI.CWaterEnvMapRenderFromUScene_setCamPos(swigCPtr, this, CVector.getCPtr(pos), pos);
  }

  public CVector getCamPos() {
    return new CVector(nel3dJNI.CWaterEnvMapRenderFromUScene_getCamPos(swigCPtr, this), false);
  }

  public void setZRange(float znear, float zfar) {
    nel3dJNI.CWaterEnvMapRenderFromUScene_setZRange(swigCPtr, this, znear, zfar);
  }

  public UScene getScene() {
    long cPtr = nel3dJNI.CWaterEnvMapRenderFromUScene_getScene(swigCPtr, this);
    return (cPtr == 0) ? null : new UScene(cPtr, false);
  }

  public float getZNear() {
    return nel3dJNI.CWaterEnvMapRenderFromUScene_getZNear(swigCPtr, this);
  }

  public float getZFar() {
    return nel3dJNI.CWaterEnvMapRenderFromUScene_getZFar(swigCPtr, this);
  }

  public void setRenderPart(UScene.TRenderPart renderPart) {
    nel3dJNI.CWaterEnvMapRenderFromUScene_setRenderPart(swigCPtr, this, renderPart.swigValue());
  }

  public UScene.TRenderPart getRenderPart() {
    return UScene.TRenderPart.swigToEnum(nel3dJNI.CWaterEnvMapRenderFromUScene_getRenderPart(swigCPtr, this));
  }

  public void preRender(double arg0, UDriver arg1) {
    nel3dJNI.CWaterEnvMapRenderFromUScene_preRender(swigCPtr, this, arg0, UDriver.getCPtr(arg1), arg1);
  }

  public void postRender(double arg0, UDriver arg1) {
    nel3dJNI.CWaterEnvMapRenderFromUScene_postRender(swigCPtr, this, arg0, UDriver.getCPtr(arg1), arg1);
  }

}
